package com.jt.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @Author shaohe_zhang
 * @Date 2021/12/10 13:17
 * @Version 1.0.0
 */

@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("message")
public class Message extends BasePojo {
    @TableId(type = IdType.AUTO)
    private int id; //主键ID
    private String fromName;    //评论者姓名
    private int fromId; //评论者id
    private String headImg; //评论者头像
    private String toName;  //被评论者姓名
    private int toId;   //被评论者id
    private String comment; //评论信息
    private int likeNum;   //点赞人数
    private boolean inputShow;  //显示被回复人名
    @TableField(exist = false)  //属性不是表字段
    private List<Message> children;
}
